package com.vogue.supplymall.shop.domain.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.vogue.ssm.database.dao.BaseDao;
import com.vogue.supplymall.shop.domain.dao.ProductAttrplanDao;
import com.vogue.supplymall.shop.domain.model.ProductAttrplan;
import com.vogue.supplymall.shop.domain.service.ProductAttrplanService;
/**
 * The type  service.
 *
 * @aouthor: gzl
 * @create: 2017 -12-01
 */
@Service("productAttrplanService")
public class ProductAttrplanServiceImp extends BaseServiceImpl<ProductAttrplan, Long> implements ProductAttrplanService {

	@Resource
	private ProductAttrplanDao productAttrplanDao;
	
	public ProductAttrplanServiceImp(BaseDao<ProductAttrplan, Long> baseDao) {
		super(baseDao);
		// TODO Auto-generated constructor stub
	}

	@Override
	public ProductAttrplan findProductAttrplanBySP(Long id) {
		ProductAttrplan pa=new ProductAttrplan();
		
		List<ProductAttrplan> list=productAttrplanDao.findProductAttrplanBySP(id);		
		if(list.size()>0&&list.get(0)!=null) {
			pa=list.get(0);
		}
		
		return pa;
	}
	
 

}
